package com.itheima.Demo1;

import java.io.*;

public class TestDemo3 {
    public static void main(String[] args) throws IOException {
        //创建字节缓冲输入流对象
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("test-fileinputStream\\niHao.txt"));
        //创建字节缓冲输出流对象
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("test-fileinputStream\\copy.txt"));
        int len;
        while((len = bis.read())!=-1){
            //写数据
            bos.write(len);
        }

        bos.close();
        bis.close();




    }
}
